/**
 *====================================================
 * 文件名称: FinanceAppActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2016年10月31日 下午2:02:38  			2016年10月31日 下午2:02:38  (创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.action.v1;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.member.action.v1.model.EnterpriseGradeEvaluation;
import com.yuexunit.finance.project.action.v1.model.FinanceTaskCount;
import com.yuexunit.finance.project.action.v1.model.input.FinanceHandleWorkflow;
import com.yuexunit.finance.project.action.v1.model.input.NoticeHandleWorkflow;
import com.yuexunit.finance.project.action.v1.model.input.PickupHandleWorkflow;
import com.yuexunit.finance.project.action.v1.model.output.FinanceAuditLog;
import com.yuexunit.finance.project.action.v1.model.output.FinanceEmployeeInfo;
import com.yuexunit.finance.project.action.v1.model.output.FinanceEvidentiaryCategoryOutput;
import com.yuexunit.finance.project.action.v1.model.output.FinanceGroupInfo;
import com.yuexunit.finance.project.action.v1.model.output.FinanceGroupMemberInfo;
import com.yuexunit.finance.project.action.v1.model.output.FinanceOrganInfo;
import com.yuexunit.finance.project.action.v1.model.output.FinanceTask;
import com.yuexunit.finance.project.action.v1.model.output.FinanceTaskApplyInfo;
import com.yuexunit.finance.project.action.v1.model.output.FinanceTaskGoodsInfo;
import com.yuexunit.finance.project.action.v1.model.output.FinanceTaskLoanInfo;
import com.yuexunit.finance.project.action.v1.model.output.FinanceTaskPickupInfo;
import com.yuexunit.fs.action.dto.InquireFileOutput;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.persist.annotation.Transactional;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/** 
 * @ClassName: FinanceAppActionApi 
 * @Description: TODO 指尖金融app端接口管理
 * @author: NTBK-021-1010
 * @date: 2016年10月31日 下午2:02:38  	
 */
public interface FinanceAppActionApi {
	@Permission
	@Action(version =FinVersion1.class,description="查询流程待办列表数量")
	public FinanceTaskCount inquireFinanceTaskCount() throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class,description="查询流程待办列表")
	public PageList<FinanceTask> inquireFinanceTaskList(
			@Parameter(name = "type", description = "类型 1:融资 2:放款 3:提货 4:资质认证 5:等级调整 6:临时额度 7:销售提货", nullable = true) Integer type,
			@Parameter(name = "companyName", description = "企业公司名", nullable = true) String companyName,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class,description="查询流程待办列表数量")
	public FinanceTaskCount inquireFinanceTaskCount1() throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class,description="查询流程待办列表")
	public PageList<FinanceTask> inquireFinanceTaskList1(
			@Parameter(name = "type", description = "类型 1:融资 2:放款 3:提货 4:资质认证 5:等级调整 6:临时额度 7:销售提货", nullable = true) Integer type,
			@Parameter(name = "companyName", description = "企业公司名", nullable = true) String companyName,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class,description="查询流程完成列表")
	public PageList<FinanceTask> inquireFinanceCompleteTaskList(
			@Parameter(name="type", description = "类型 0:全部 1:融资 2:放款 3:提货 4:资质认证 5:等级调整 6:临时额度 7:代采代销", nullable = true) Integer type,
			@Parameter(name = "page", description = "分页参数") PageCriteria page,
			@Parameter(name="companyName", description = "企业公司名", nullable = true) String companyName
	);
	
	@Permission
	@Action(version =FinVersion1.class,description="放款-审批页面详细数据接口")
	public FinanceTaskLoanInfo inquireFinanceLoadDetail(
			@Parameter(name = "loanNoticeId", description = "放款信息ID")Long loanNoticeId
	) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class,description="融资-审批页面详细数据接口")
	public FinanceTaskApplyInfo inquireFinanceApplyDetail(
			@Parameter(name = "financeId", description = "融资信息ID") Long financeId
	) throws Exception;

	@Permission
	@Action(version =FinVersion1.class,description="提货-审批页面详细数据接口")
	public FinanceTaskPickupInfo inquireFinancePickupInfo(
			@Parameter(name = "pickupId", description = "提货信息ID") Long pickupId
	) throws Exception;

	@Permission
	@Action(version =FinVersion1.class,description="融资-货物|箱|保单数据")
	public FinanceTaskGoodsInfo inquireFinanceApplyAllDetail(
			@Parameter(name = "financeId", description = "融资信息ID") Long financeId
	) throws IllegalAccessException, InvocationTargetException ;
	
	@Permission
	@Action(version =FinVersion1.class,description="融资-流程审核意见处理接口")
	public Map<String,Object> handleFinanceWorkflowInfo(FinanceHandleWorkflow financeHandleWorkflow) throws Exception ;
	
	@Permission
	@Action(version =FinVersion1.class,description="放款-流程审核意见处理接口")
	public Map<String,Object> handleLoanNoticeWorkflowInfo(NoticeHandleWorkflow financeHandleWorkflow) throws Exception ;
	
	@Permission
	@Action(version =FinVersion1.class,description="提货-流程审核意见处理接口")
	public Map<String,Object> handlePickupWorkflowInfo(PickupHandleWorkflow financeHandleWorkflow) throws Exception ;
	
	@Permission
	@Action(version =FinVersion1.class,description="销售提货-流程审核意见处理接口")
	public Map<String,Object> handleWarehousePickupWorkflowInfo(
			@Parameter(name = "pickupId", description = "提货ID") Long pickupId,
			@Parameter(name = "auditState", description = "审核状态") Boolean auditState,
			@Parameter(name = "auditRemark", description = "审核意见 ", nullable = true) String auditRemark
	) throws Exception ;
	
	@Permission
	@Action(version =FinVersion1.class,description="融资-附件信息")
	public List<FinanceEvidentiaryCategoryOutput> financeAttachmentInfo(
			@Parameter(name = "financeId", description = "融资业务ID") Long financeId
	) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class,description="放款、提货附件信息")
	public List<InquireFileOutput> attachmentInfo(
			@Parameter(name = "auditId", description = "提货、放款业务ID")Long auditId,
			@Parameter(name = "auditTask", description = "审核节点")Long auditTask
	) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class,description="审核流程信息")
	public List<FinanceAuditLog> auditWorkflowInfo(
			@Parameter(name = "id", description = "审核业务ID")Long id,
			@Parameter(name = "auditTask", description = "审核节点") Long auditTask
	);

	@Permission
	@Action(version =FinVersion1.class,description="员工通讯录")
	public List<FinanceEmployeeInfo> addressList();
	
	@Permission
	@Action(version =FinVersion1.class,description="获取组织架构列表")
	public List<FinanceOrganInfo> getOrganizationList();

	@Permission 
	@Action(version =FinVersion1.class,description="获取部门成员列表--废弃")
	public List<FinanceEmployeeInfo> getDepartmentMemberList(
			@Parameter(name = "departmentId", description = "部门id") String departmentId
	);
	
	@Permission
	@Action(version =FinVersion1.class,description="获取我的常用联系人列表,并返回头像")
	public List<FinanceEmployeeInfo> getFrequentContactList();
	
	@Permission
	@Action(version =FinVersion1.class,description="设置(取消)常用联系人")
	public void setCommonContact(
			@Parameter(name = "userId", description = "部门id") String userId,
			@Parameter(name = "type", description = "0:取消;1:添加") String type
	) throws Exception;

	@Permission
	@Action(version =FinVersion1.class,description="查询员工列表")
	public List<FinanceEmployeeInfo> inquireEmployeeLists(
			@Parameter(name = "empId", description = "部门id") Long empId
	);
	
	@Permission
	@Action(version =FinVersion1.class,description="模糊查询查询员工列表")
	public List<FinanceEmployeeInfo> inquireEmployeeLikeList(
			@Parameter(name = "name", description = "员工名称") String name
	);

	@Permission
	@Action(version = FinVersion1.class, description = "审核企业-保存等级信息(json数据)")
	public void auditEnterpriseSaveByJson(EnterpriseGradeEvaluation params);

	@Permission
	@Action(version = FinVersion1.class, description = "客户认证企业信息审批")
	public Map<String,Object> handleEnterpriseAudit(
			@Parameter(name = "enterpriseId", description = "企业ID") Long enterpriseId,
			@Parameter(name = "taskType", description = "业务类型Id:融资|放款|提货|客户认证|等级调整|临时额度") String taskType,
			@Parameter(name = "submitType", description = "0:保存/1:提交") String submitType,
			@Parameter(name = "submitState", description = "0:拒绝/1:同意") Long submitState,
			@Parameter(name = "opinion", description = "审核意见", nullable = true) String opinion
	)throws Exception;
	
	@Permission
	@Action(version = FinVersion1.class, description = "用户等级调整审批")
	public Map<String,Object> handleEnterpriseGradeAudit(
			@Parameter(name = "gradeEvaluationId", description = "评估信息ID")Long gradeEvaluationId,
			@Parameter(name = "taskType", description = "业务类型Id:融资|放款|提货|客户认证|等级调整|临时额度") String taskType,
			@Parameter(name = "submitType", description = "0:保存/1:提交") String submitType,
			@Parameter(name = "submitState", description = "0:拒绝/1:同意") Long submitState,
			@Parameter(name = "opinion", description = "审核意见", nullable = true) String opinion
	)throws Exception;
	
	@Permission
	@Action(version = FinVersion1.class, description = "临时额度调整审批")
	public Map<String,Object> handleEnterpriseTemQuotaAudit(
			@Parameter(name = "temporaryCreditlineEvaluationId", description = "临时额度调整ID") Long temporaryCreditlineEvaluationId,
			@Parameter(name = "taskType", description = "业务类型Id:融资|放款|提货|客户认证|等级调整|临时额度") String taskType,
			@Parameter(name = "submitType", description = "0:保存/1:提交") String submitType,
			@Parameter(name = "submitState", description = "0:拒绝/1:同意") Long submitState,
			@Parameter(name = "opinion", description = "审核意见", nullable = true) String opinion
	)throws Exception;
	
	@Permission
	@Action(version = FinVersion1.class, description = "创建用户群组")
	public Long createFinanceGroupEntity(
			FinanceGroupInfo financeGroupEntity
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "添加用户群组成员")
	public void createFinanceGroupMemberEntity(@Parameter(name = "groupId", description = "群组标识")String groupId,
			@Parameter(name = "groupName", description = "群组名称")String groupName,
			@Parameter(name = "emps", description = "成员标识")String emps
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询所有用户群组")
	public List<FinanceGroupInfo> inquireFinanceGroupEntityList();
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询单个群组成员")
	public List<FinanceGroupMemberInfo> inquireFinanceGroupMemberEntityList(
			@Parameter(name = "groupId", description = "群组标识") String groupId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "删除单个群组成员")
	public void deleteFinanceGroupMember(@Parameter(name = "emp", description = "员工ID") Long emp,
			@Parameter(name = "groupId", description = "群组标识")String groupId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "删除单个群组")
	public void deleteFinanceGroup(
			@Parameter(name = "groupId", description = "群组标识") String groupId
	);
}
